package cz.cuni.amis.episodic.bayes.utils;

import lombok.Data;

/**
 * Contains information that was valid in the given time. It probably changed as
 * new observations were gathered.
 *
 * @author ik
 */

@Data
public class DynamicNodeProperty extends NodeSnapshot {
    
    public DynamicNodeProperty(int t, String node) {
        super(node);
        this.t = t;
    }
    /**
     * Time.
     */
    int t;
    /**
     * Surprise at time t computed as KL divergence between node's prior and
     * posterior distribution.
     */
    double[] surprise;
    double[][] fullPosterior;
    
    public double[][] getFullPrior() {
        return getProbability();
    }
    
    public void setFullPrior(double[][] prob) {
        setProbability(prob);
    }
    
    public double[] getPrior() {
        return getFullPrior()[t];
    }
    
    public double[] getPosterior() {
        return fullPosterior[t];
    }
}
